package com.kk.aopdemo.controller;


import com.kk.aopdemo.pojo.SysLogBO;
import com.kk.aopdemo.service.SysLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author MH
 */
@RestController
public class TestController {

    @Autowired
    private SysLogService sysLogService;

    @GetMapping("/test")
    public String test(@RequestParam(value = "name", defaultValue = "wangzhiqiang") String name) {
        SysLogBO sysLogBO = new SysLogBO();
        sysLogService.add(sysLogBO);
        return name;
    }

}
